<?php 
## include required files
/*******************************/
require_once '../model/users.php';
require_once '../model/trade.php';
require_once '../model/budget.php';
/*******************************/

## Create Objects
/*******************************/
$userObj = new Model_Users();
$tradeObj = new Model_TRADE();
$budgetObj = new Model_Budget();
/*******************************/

## Fetch admin user details by id
if($_GET['id'] != '') 
{
	$getid = base64_decode($_GET['id']);	
	
	$getuserjobdetail = $userObj->getUserViewjobDetailsByID($getid);
	
	$job_id = $getuserjobdetail['jobid'];	
	$job_details = $userObj->getJobDetailsById($job_id);
	$getjobtype = $tradeObj->getTradeCategoryDetailsById($job_details['jobtype_id']);	
	$job_details['jobtype_name'] = $getjobtype['trade_category'];
	$budgetdetail = $budgetObj->getBudgetDetailsById($job_details['approx_budget']);
	$job_details['budget_name'] = $budgetdetail['budget_name'];	
	$job_details['message'] = $getuserjobdetail['message'];
	$smarty->assign('job_details', $job_details);

}


## Set active class variable for left menu
$smarty->assign('activeclass', 'joblead');
$smarty->assign('mainmenu', '7');
## Unset all the objects created which are on this page
unset($userObj);

$smarty->display(TEMPLATEDIR_ADMIN. 'joblead/jobleaddetail.tpl');
unset($smarty);
?>